<?php
class Loader{

	var $__loaded = array();

	function controller($name, $throwException = true){
		$fullpath = CONTROLLERS.Inflector::underscore($name).'_controller.php';

		if(file_exists($fullpath)){
			require_once($fullpath);
		}
		else{
			if($throwException){
				throw new MissingControllerException($name);
			}
		}
	}
}